<?php

/**
 * This is the model class for table "tbl_rec_led_apply".
 *
 * The followings are the available columns in table 'tbl_rec_led_apply':
 * @property integer $id
 * @property integer $ledgerentryid
 * @property double $paid
 * @property string $applieddate
 * @property string $jobid
 * @property integer $type
 * @property integer $number
 * @property string $custno
 * @property string $locno
 * @property string $memo
 */
class RecLedApply extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return RecLedApply the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'tbl_rec_led_apply';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			//array('ledgerentryid, paid, applieddate, jobid, type, custno, locno, memo', 'required'),
			array('ledgerentryid', 'numerical', 'integerOnly'=>true),
			array('paid', 'numerical'),
			array('jobid,number', 'length', 'max'=>20),
			array('custno', 'length', 'max'=>7),
			array('locno', 'length', 'max'=>5),
			array('memo', 'length', 'max'=>300),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, ledgerentryid, paid, applieddate, jobid, type, number, custno, locno, memo', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'ledgerentryid' => 'Ledgerentryid',
			'paid' => 'Paid',
			'applieddate' => 'Applieddate',
			'jobid' => 'Jobid',
			'type' => 'Type',
			'number' => 'Number',
			'custno' => 'Custno',
			'locno' => 'Locno',
			'memo' => 'Memo',
		);
	}

}